package com.ody.util.code.model;

public class RelPOBean extends POBean {
    private POBean mainBean;
    private FieldBean mainField;
    private FieldBean relField;
    
    public RelPOBean() {}
    
    public RelPOBean(POBean mainBean, FieldBean mainField, FieldBean relField,
                     String name, String table, String comment) {
        super(name, table, comment);
        this.mainBean = mainBean;
        this.mainField = mainField;
        this.relField = relField;
    }
    
    public POBean getMainBean() {
        return mainBean;
    }
    
    public void setMainBean(POBean mainBean) {
        this.mainBean = mainBean;
    }
    
    public FieldBean getMainField() {
        return mainField;
    }
    
    public void setMainField(FieldBean mainField) {
        this.mainField = mainField;
    }
    
    public FieldBean getRelField() {
        return relField;
    }
    
    public void setRelField(FieldBean relField) {
        this.relField = relField;
    }
    
    public boolean isRel() {
        return true;
    }
    
    @Override
    public boolean isIgnore(String ignoreModel) {
        if ("$rel".equals(ignoreModel)) {
            return true;
        }
        return super.isIgnore(ignoreModel);
    }
}
